#!/usr/bin/php
<?php

require(dirname(__FILE__)."/../src_v2/classes/Token.php");


$uname   = 'admin';
$pwd_md5 = md5('admin');

$token = Token::generate($uname, $pwd_md5, 1800);

$cookie_struct = array( 'token' => $token);
$cookie_json   = json_encode( $cookie_struct );


$_COOKIE['ParaSite_Auth'] = $cookie_json;

$request = array(
    'operation' => 'chat_del_msgs',
    'postback'  => 'blah',
    'param'     => array(
        'ids' => array( 24 )
        )
);

$json = json_encode( $request );

$_POST['json']= $json;

require_once(dirname(__FILE__)."/../src_v2/classes/init.php");
require(dirname(__FILE__)."/../src_v2/remote.php");
echo "\n---end of response \n";

?>